<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ol>
        <li id="first">张三</li>
        <li id="second"><span>李四</span></li>
        <li id="third">王五</li>
        <li>小明</li>
        <li>小红</li>
    </ol>
</body>
</html>
<script>
    var firstOne=document.getElementById('first')
    console.log(firstOne.innerText);
    var secondOne=document.getElementById('second')
    console.log(secondOne.innerText);
    var thirdOne=document.getElementById('third')
    thirdOne.innerText='小兰';
</script>